package cn.com.captureNetPacket.dao;


import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.context.annotation.Primary;

import cn.com.captureNetPacket.model.ConfigInfo;
import cn.com.captureNetPacket.model.DeviceInfo;
import cn.com.captureNetPacket.model.ParamCondition;
import cn.com.captureNetPacket.model.RecordLog;



@Mapper
@Primary
public interface RecordLogMapper {
// oracle
//	@Insert("insert into RecordLog(id,callId,callUUID,fromUser,toUser,caller,called,deviceNumber,agentID,beginTime,ringTime,establishTime,endTime,endCase,clientIP,serverIP,direction,recordPath,appData,reservedFields,reservedFields1,reservedFields2,reservedFields3,reservedFields4,clusterServerId) "
//			+ "values(#{id,jdbcType=VARCHAR},#{callId,jdbcType=VARCHAR},#{callUUID,jdbcType=VARCHAR},#{fromUser},#{toUser},#{caller,jdbcType=VARCHAR},#{called,jdbcType=VARCHAR},#{deviceNumber,jdbcType=VARCHAR},#{agentID,jdbcType=VARCHAR},#{begin_time,jdbcType=DATE},#{ring_time,jdbcType=DATE},#{establish_time,jdbcType=DATE},#{end_time,jdbcType=DATE},#{endCase,jdbcType=VARCHAR},#{clientIP,jdbcType=VARCHAR},#{serverIP,jdbcType=VARCHAR},#{direction,jdbcType=VARCHAR},#{recordPath,jdbcType=VARCHAR},#{appData,jdbcType=VARCHAR},#{reservedFields,jdbcType=VARCHAR},#{reservedFields1,jdbcType=VARCHAR},#{reservedFields2,jdbcType=VARCHAR},#{reservedFields3,jdbcType=VARCHAR},#{reservedFields4,jdbcType=VARCHAR},#{clusterServerId,jdbcType=VARCHAR})")

	//mysql
//	@Insert("insert into RecordLog(id,callId,callUUID,fromUser,toUser,caller,called,deviceNumber,agentID,beginTime,ringTime,establishTime,endTime,endCase,clientIP,serverIP,direction,recordPath,appData,reservedFields,reservedFields1,reservedFields2,reservedFields3,reservedFields4,clusterServerId) "
//			+ "values(#{id,jdbcType=VARCHAR},#{callId,jdbcType=VARCHAR},#{callUUID,jdbcType=VARCHAR},#{fromUser},#{toUser},#{caller,jdbcType=VARCHAR},#{called,jdbcType=VARCHAR},#{deviceNumber,jdbcType=VARCHAR},#{agentID,jdbcType=VARCHAR},#{beginTime},#{ringTime},#{establishTime},#{endTime},#{endCase,jdbcType=VARCHAR},#{clientIP,jdbcType=VARCHAR},#{serverIP,jdbcType=VARCHAR},#{direction,jdbcType=VARCHAR},#{recordPath,jdbcType=VARCHAR},#{appData,jdbcType=VARCHAR},#{reservedFields,jdbcType=VARCHAR},#{reservedFields1,jdbcType=VARCHAR},#{reservedFields2,jdbcType=VARCHAR},#{reservedFields3,jdbcType=VARCHAR},#{reservedFields4,jdbcType=VARCHAR},#{clusterServerId,jdbcType=VARCHAR})")
//	@Options(useGeneratedKeys=true,keyProperty="id",keyColumn="id")
	public int addRecordLog(RecordLog recordLog) ;
	
	public void removeRecordLog(RecordLog recordLog);
	
	public void updateRecordLog(RecordLog recordLog);

	public List<RecordLog> queryRecordLogs();
	
	public List<RecordLog> searchByCondition(Integer currentPage, Integer size, ParamCondition<RecordLog> paramCondition);

}
